/*
 * @Description: 定义角色字段类型
 * @Author: zhihong deng
 * @Date: 2021-09-19 16:58:14
 * @LastEditors: zhihong deng
 * @LastEditTime: 2021-09-19 20:18:07
 */
const mongoose = require('mongoose')
const roleSchema = mongoose.Schema({
	roleName: String, //角色名称
  remark: String, // 备注
	createTime: {
		type: Date,
		default: Date.now(),
	}, //创建时间
  updateTime: {
		type: Date,
		default: Date.now(),
	}, //更新时间
  permissionList: {
    checkedKeys: [],
    halfCheckedKeys: []
  }
})

module.exports = mongoose.model('roles', roleSchema, 'roles')